using Microsoft.SqlServer.Management.Sdk.Sfc;
using System;
using System.Collections.Generic;

namespace Microsoft.SqlServer.Management.SqlManagerUI.Scripting
{
	internal class FilterObjectWithDepends
	{
		public Urn[] GetDiscoverableObjects(IEnumerable<Urn> urns)
		{
			if (urns == null)
			{
				throw new ArgumentNullException("urns");
			}
			List<Urn> list = new List<Urn>();
			foreach (Urn current in urns)
			{
				if (ObjectsWithDependencies.CanDiscoverDependencies(current))
				{
					list.Add(current);
				}
			}
			return list.ToArray();
		}
	}
}
